﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsView;

namespace WindowsFormsPresenter.RestaurantMenu
{
    public class RestaurantMenusPresenter : Presenter<IRestaurantMenusView>
    {
        public RestaurantMenusPresenter(IRestaurantMenusView view)
            : base(view)
        {
        }

        public void DisplayActiveByBranch()
        {
            View.RestaurantMenus = Model.GetRestaurantMenusActiveByBranch();
        }

        public void DisplayPagedByBranch(int currentPage)
        {
            View.RestaurantMenus = Model.GetRestaurantMenusPagedByBranch(currentPage);
        }

        public void DisplayPagedByCategory(int currentPage, string menuCategoryId)
        {
            View.RestaurantMenus = Model.GetRestaurantMenusPagedByCategory(currentPage, menuCategoryId);
        }

        public int GetTotalPageByBranch()
        {
            return Model.GetTotalPageFromRestaurantMenu();
        }

        public int GetTotalPageByCategory(string menuCategoryId)
        {
            return Model.GetTotalPageFromRestaurantMenuByCategory(menuCategoryId);
        }
    }
}
